Skip to main content

Running ASP.NET Core on a RaspberryPi 2 with NGINX

· One min read
Mark Burton
Software Engineer & Technical Writer

Running ASP.NET Core on a RaspberryPi 2 with Nginx​

I followed the instructions from Get Started and docs.microsoft.com, and found that some additional configuration was required.

Prerequisites​

The prerequisites are required or you will get an error like:

Failed to load ▒▒▒, error: libunwind.so.8: cannot open shared object file: No such file or directory Failed to bind to CoreCLR at /varwwwPublishOutputlibcoreclr.so'

Permissions​

chmod 744?

Tell Kestrel to listen​

If you are running headless you will need Kestrel to be listening for external requests to confirm the app is running, this can be done using the ASPNETCORE_URLS environment variable.

ASPNETCORE_URLS="http://*:5000" dotnet Your.App.dll

Create the service file​

add a symlink for dotnet to limit the changes to the service file

sudo ln -s /optdotnetdotnet /usrbindotnet

Configuring SSL​

Rather than building nginx from source to get SSL I used nginx-core.